﻿<%@ Page Language="C#"  MasterPageFile="~/MasterPage.master" AutoEventWireup="true" Inherits="Nivdal.OldLeagueTables" Title="" StylesheetTheme="SkinFile" Codebehind="OldLeagueTables.aspx.cs" %>

<asp:Content ID="PageNameContent" ContentPlaceHolderID="PageNamePlaceHolder" runat="server">
    <asp:Label ID="PageNameLabel" runat="server" Text=" " CssClass="PageNameContentStyle"></asp:Label>
</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:HiddenField ID="LeagueIdHiddenField" runat="server" />
    <div class="basic_element">
    <asp:FormView ID="FormView1" runat="server"  DataSourceID="SqlDataSource1" Width="100%">
        <ItemTemplate>
            <div class="red_title_no_padding">
            <div class="grey_title_inside_red floater">
              <asp:Hyperlink ID="LeagueNameLink" runat="server" Text='<%# Eval("Leaguename") %>' CssClass="team_name_white"
               NavigateUrl='<%# Eval("LeagueId","~/League.aspx?LeagueId={0}") %>'></asp:Hyperlink>

            </div>
            <div class="grey_title_triangle floater"></div>
                <asp:Hyperlink ID="CountryLink" runat="server" ImageUrl='<%# Eval("FlagFileName", "~/Images/Flags/{0}") %>' 
                 NavigateUrl='<%# Eval("CountryId", "Country.aspx?Id={0}") %>' CssClass="rounded_corners" ></asp:Hyperlink>
                &nbsp;
                <asp:Label ID="LeagueLevelLabel" runat="server" Text='<%# Eval("LeagueLevel") %>' CssClass="white_title" />
            </div>
        </ItemTemplate>
    </asp:FormView>
    
    <div class="padding5">

        <table cellspacing="3">
            <tr>
                <td>
                    <asp:Label ID="ChooseSeasonLabel" runat="server" Text="<%$ Resources:Resource, Global_ChooseSeason  %>" 
                        SkinID="InfoLabel"></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="SeasonDropDownList" runat="server" AutoPostBack="true" OnSelectedIndexChanged="Button1_Click"
                        DataSourceID="SqlDataSource5" DataTextField="Season" 
                        DataValueField="Season Number">
                    </asp:DropDownList>
                </td>
                <td>
<%--                    <asp:Button ID="Button1" runat="server" ValidationGroup = "NewSeason" Text="<%$ Resources:Resource, Global_GoalsHeader  %>" 
                     CssClass="GreenSmallButtonStyle" onclick="Button1_Click" />--%>
                </td>
            </tr>
            
        </table>
        <br />
    
        <asp:GridView ID="GridView4" SkinID="Professional" runat="server" DataSourceID="SqlDataSource2" AutoGenerateColumns="False">
        <Columns>
            <asp:TemplateField>
                <ItemTemplate>
                    <asp:Label ID="Label18" runat="server" Text='<%# Eval("N")%>' SkinID="GridLabel"> </asp:Label>
                    <asp:Image ID="GreenArrow" runat="server" ImageUrl="~/Images/Icons/arrowup.png" Visible='<%# GreenVisible(Eval("N")) %>' />
                    <asp:Image ID="RedArrow" runat="server" ImageUrl="~/Images/Icons/arrowdown.png" Visible='<%# RedVisible(Eval("N")) %>' />
                </ItemTemplate>
             </asp:TemplateField>
             <asp:TemplateField> 
                <HeaderTemplate>
                   <asp:Label ID="TeamNameLabel" ToolTip="<%$ Resources:Resource, Global_TeamName  %>" runat="server" Text="<%$ Resources:Resource, Global_TeamName  %>"></asp:Label>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:HyperLink ID="HyperLink2" runat="server" Text='<%# Eval("Team Name") %>' SkinID="BlackHyperLinkSkin"
                    NavigateUrl='<%# Eval("TeamId ", "TeamHomePage.aspx?TeamId={0}") %>'></asp:HyperLink>
                </ItemTemplate>
            </asp:TemplateField>
            
             <asp:TemplateField> 
             <HeaderTemplate>
               <asp:Label ID="GamesLabel" ToolTip="<%$ Resources:Resource, Global_Games%>" runat="server" Text="<%$ Resources:Resource, Global_GamesHeader  %>"></asp:Label>
             </HeaderTemplate>  
                <ItemTemplate>
                <asp:Label ID="Label1" runat="server"   Text='<%# Eval("Games")%>' SkinID="GridLabel"> </asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
             <asp:TemplateField>
             <HeaderTemplate>
               <asp:Label ID="PointsLabel" ToolTip="<%$ Resources:Resource, Global_Points  %>" runat="server" Text="<%$ Resources:Resource, OldLeagueTables_PointsLabel  %>"></asp:Label>
             </HeaderTemplate>   
                <ItemTemplate>
                <asp:Label ID="Label1" runat="server"  Text='<%# Eval("P")%>' SkinID="GridLabel"> </asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
             <asp:TemplateField>
             <HeaderTemplate>
               <asp:Label ID="GoalsLabel" ToolTip="<%$ Resources:Resource, Global_Goals  %>" runat="server" Text="<%$ Resources:Resource, Global_GoalsHeader  %>"></asp:Label>
             </HeaderTemplate>    
                <ItemTemplate>
                <asp:Label ID="Label1" runat="server"  Text='<%# Eval("Goals")%>' SkinID="GridLabel"> </asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
             <asp:TemplateField>
             <HeaderTemplate>
               <asp:Label ID="WinsLabel" ToolTip="<%$ Resources:Resource, OldLeagueTables_WinsToolTip  %>" runat="server" Text="<%$ Resources:Resource, OldLeagueTables_WinsLabel  %>"></asp:Label>
             </HeaderTemplate>    
                <ItemTemplate>
                <asp:Label ID="Label1" runat="server"   Text='<%# Eval("W")%>' SkinID="GridLabel"> </asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
             <asp:TemplateField>
             <HeaderTemplate>
               <asp:Label ID="DrawsLabel" ToolTip="<%$ Resources:Resource, Global_Draws  %>" runat="server" Text="<%$ Resources:Resource, Global_DrawsHeader  %>"></asp:Label>
             </HeaderTemplate>     
                <ItemTemplate>
                <asp:Label ID="Label1" runat="server"   Text='<%# Eval("D")%>'  SkinID="GridLabel"> </asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
             <asp:TemplateField>
             <HeaderTemplate>
               <asp:Label ID="LossesLabel" ToolTip="<%$ Resources:Resource, Global_Losses  %>" runat="server" Text="<%$ Resources:Resource, Global_LossesHeader  %>"></asp:Label>
             </HeaderTemplate>     
                <ItemTemplate>
                <asp:Label ID="Label1" runat="server"  Text='<%# Eval("L")%>' SkinID="GridLabel"> </asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
             <asp:TemplateField>
             <HeaderTemplate>
               <asp:Label ID="WinsAtHomeLabel" ToolTip="<%$ Resources:Resource, OldLeagueTables_WinsAtHomeToolTip  %>" runat="server" Text="<%$ Resources:Resource, OldLeagueTables_WinsAtHomeLabel  %>"></asp:Label>
             </HeaderTemplate>     
                <ItemTemplate>
                <asp:Label ID="Label1" runat="server"  Text='<%# Eval("WH")%>' SkinID="GridLabel"> </asp:Label>
                </ItemTemplate>
            </asp:TemplateField>      
             <asp:TemplateField>
             <HeaderTemplate>
               <asp:Label ID="DrawsAtHomeLabel" ToolTip="<%$ Resources:Resource, Global_DrawsAtHome  %>" runat="server" Text="<%$ Resources:Resource, Global_DrawsHomeHeader  %>"></asp:Label>
             </HeaderTemplate>     
                <ItemTemplate>
                <asp:Label ID="Label1" runat="server"  Text='<%# Eval("DH")%>' SkinID="GridLabel"> </asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField> 
            <HeaderTemplate>
               <asp:Label ID="LossesAtHomeLabel" ToolTip="<%$ Resources:Resource, Global_LossesAtHome  %>" runat="server" Text="<%$ Resources:Resource, Global_LossesHomeHeader  %>"></asp:Label>
             </HeaderTemplate>   
                <ItemTemplate>
                <asp:Label ID="Label1" runat="server"   Text='<%# Eval("LH")%>' SkinID="GridLabel"> </asp:Label>
                </ItemTemplate>
                </asp:TemplateField>
             <asp:TemplateField>
             <HeaderTemplate>
               <asp:Label ID="WinsAwayLabel" ToolTip="<%$ Resources:Resource, OldLeagueTables_WinsAwayToolTip  %>" runat="server" Text="<%$ Resources:Resource, OldLeagueTables_WinsAwayLabel  %>"></asp:Label>
             </HeaderTemplate>     
                <ItemTemplate>
                <asp:Label ID="Label1" runat="server"  Text='<%# Eval("WA")%>' SkinID="GridLabel"> </asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
             <asp:TemplateField>
             <HeaderTemplate>
               <asp:Label ID="DrawsAwayLabel" ToolTip="<%$ Resources:Resource, Global_DrawsAway  %>" runat="server" Text="<%$ Resources:Resource, Global_DrawsAwayHeader  %>"></asp:Label>
             </HeaderTemplate>     
                <ItemTemplate>
                <asp:Label ID="Label1" runat="server"  Text='<%# Eval("DA")%>' SkinID="GridLabel"> </asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
             <asp:TemplateField>
             <HeaderTemplate>
               <asp:Label ID="lossesAwayLabel" ToolTip="<%$ Resources:Resource, Global_LossesAway  %>" runat="server" Text="<%$ Resources:Resource, Global_LossesAwayHeader  %>"></asp:Label>
             </HeaderTemplate>     
                <ItemTemplate>
                <asp:Label ID="Label1" runat="server"   Text='<%# Eval("LA")%>' SkinID="GridLabel"> </asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            
        </Columns>

      </asp:GridView> 
    </div>
    </div>
   
     <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="Nivdal_ShowLeagueDetails" SelectCommandType="StoredProcedure">
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="Nivdal_ShowLeagueTable" SelectCommandType="StoredProcedure">
        </asp:SqlDataSource>
        
    <asp:SqlDataSource ID="SqlDataSource5" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        SelectCommand="Nivdal_SelectSeasonsForLeague" 
        SelectCommandType="StoredProcedure">
    </asp:SqlDataSource>
</asp:Content>

